home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib.fmt / c / getpeername.man < prev    next >
Encoding:
Text File  |  1990-03-19  |  1.5 KB  |  67 lines

  1.  
  2.  
  3.  
  4. GETPEERNAME           C Library Procedures            GETPEERNAME
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      getpeername - get name of connected peer
  10.  
  11. SSYYNNOOPPSSIISS
  12.      ggeettppeeeerrnnaammee((ss,, nnaammee,, nnaammeelleenn))
  13.      iinntt ss;;
  14.      ssttrruucctt ssoocckkaaddddrr **nnaammee;;
  15.      iinntt **nnaammeelleenn;;
  16.  
  17. DDEESSCCRRIIPPTTIIOONN
  18.      _G_e_t_p_e_e_r_n_a_m_e returns the name of the peer connected to socket
  19.      _s.  The _n_a_m_e_l_e_n parameter should be initialized to indicate
  20.      the amount of space pointed to by _n_a_m_e.  On return it con-
  21.      tains the actual size of the name returned (in bytes).  The
  22.      name is truncated if the buffer provided is too small.
  23.  
  24. DDIIAAGGNNOOSSTTIICCSS
  25.      A 0 is returned if the call succeeds, -1 if it fails.
  26.  
  27. EERRRROORRSS
  28.      The call succeeds unless:
  29.  
  30.      [EBADF]        The argument _s is not a valid descriptor.
  31.  
  32.      [ENOTSOCK]     The argument _s is a file, not a socket.
  33.  
  34.      [ENOTCONN]     The socket is not connected.
  35.  
  36.      [ENOBUFS]      Insufficient resources were available in the
  37.                     system to perform the operation.
  38.  
  39.      [EFAULT]       The _n_a_m_e parameter points to memory not in a
  40.                     valid part of the process address space.
  41.  
  42. SSEEEE AALLSSOO
  43.      accept(2), bind(2), socket(2), getsockname(2)
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. Sprite v1.0               May 13, 1986                          1
  64.  
  65.  
  66.  
  67.